package com.netease.pris.activity.a;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.RatingBar;
import android.widget.TextView;
import com.netease.l.b.a;
import com.netease.pris.atom.u;
import java.util.LinkedList;
import java.util.List;

public class v extends BaseAdapter
{
  private LinkedList a;
  private Context b;
  private LayoutInflater c;

  public v(Context paramContext)
  {
    this.b = paramContext;
    this.c = ((LayoutInflater)paramContext.getSystemService("layout_inflater"));
  }

  private void a(w paramw, View paramView)
  {
    try
    {
      paramw.a = ((TextView)paramView.findViewById(2131558618));
      paramw.b = ((TextView)paramView.findViewById(2131558620));
      paramw.c = ((TextView)paramView.findViewById(2131558621));
      paramw.d = ((RatingBar)paramView.findViewById(2131558622));
      return;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
    }
    finally
    {
    }
    throw localObject;
  }

  private void a(w paramw, u paramu, int paramInt)
  {
    try
    {
      String str1 = paramu.X();
      paramw.a.setText(str1);
      paramw.d.setNumStars(paramu.ae());
      paramw.d.setRating((float)paramu.ah());
      String str2 = paramu.aB();
      paramw.b.setText(str2);
      String str3 = a.a(this.b, paramu);
      paramw.c.setText(str3);
      return;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
    }
    finally
    {
    }
    throw localObject;
  }

  public u a(int paramInt)
  {
    if (this.a != null)
      if (paramInt >= this.a.size())
        paramInt = -1 + this.a.size();
    for (u localu = (u)this.a.get(paramInt); ; localu = null)
      return localu;
  }

  public void a()
  {
    synchronized (this.a)
    {
      this.a.clear();
      notifyDataSetChanged();
      return;
    }
  }

  public void a(LinkedList paramLinkedList)
  {
    this.a = paramLinkedList;
  }

  public void a(List paramList)
  {
    if ((paramList == null) || (paramList.size() == 0));
    while (true)
    {
      return;
      synchronized (this.a)
      {
        for (int i = -1 + paramList.size(); i >= 0; i--)
          this.a.addFirst(paramList.get(i));
        notifyDataSetChanged();
      }
    }
  }

  public void b(List paramList)
  {
    if ((paramList == null) || (paramList.size() == 0));
    while (true)
    {
      return;
      synchronized (this.a)
      {
        this.a.addAll(paramList);
        notifyDataSetChanged();
      }
    }
  }

  public int getCount()
  {
    int i = 0;
    if (this.a != null)
      i = this.a.size();
    return i;
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    w localw;
    if ((paramView != null) && ((paramView.getTag() instanceof w)))
      localw = (w)paramView.getTag();
    while (true)
    {
      u localu = a(paramInt);
      if (localu != null)
        a(localw, localu, paramInt);
      return paramView;
      paramView = this.c.inflate(2130903102, null);
      localw = new w(this);
      a(localw, paramView);
      paramView.setTag(localw);
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.a.v
 * JD-Core Version:    0.6.0
 */